﻿define(["service/service", "service/httpService"], function (service) {
    service.factory("baseService", function (httpService, $sessionStorage, $q) {
        var methods = {
            regsms: function (params) {
                return httpService.post("/common/regsms", params);
            },
            shop_menus: function (params) {
                return httpService.get("/common/merchant_menus", params);
            },
            admin_menus: function (params) {
                return httpService.get("/common/admin_menus", params);
            },
            get_regions: function () {
                return httpService.get("/common/get_regions");
            },
            region: function (id) {
                return httpService.query("/common/region/" + id);
            },
			banks: function (params) {
				return httpService.get("/common/banks", params);
			},
            get_file_category: function () {
                return httpService.get("/common/get_file_category");
            },
            get_file: function (params) {
                return httpService.get("/common/get_file", params);
            },
            upload_web_file: function (params) {
                return httpService.post("/common/upload_web_file", params);
            },
            upload_file: function (params) {
                return httpService.upload("/common/upload_file", params);
            },
            dictionary: function () {
                return httpService.get("/common/dictionary");
            }
        }
        return methods;
    });
});